Deleting elements from a list